﻿//********************************************************************************//
//创建日期：<创建日期，2016-03-14>
//创建作者：<郭登杰，guodengjie@shanghai3h.com>
//功能说明：发票库存Model
//********************************************************************************//
using System;
using System.Collections.Generic;
using YXYLCommon;
using System.Data;

namespace Entity
{
    [Serializable]
    /// <summary>
    /// 发票库存
    /// </summary>
    public class YSZWFaPiaoKCMX : BaseModel
    {
        public YSZWFaPiaoKCMX()
        {
          
        }
        public int I_XT { get; set; }
        public int ID { get; set; }

        public string S_QISHIHM { get; set; }

        public string S_JIESHUHM { get; set; }

        public int I_SHULIANG { get; set; }

        public int I_JLZT { get; set; }

        public string S_CAOZUOR { get; set; }

        public DbDateTime D_CAOZUOSJ { get; set; }

        public string S_MIAOSHU { get; set; }

        public override BaseModel ToObject(System.Data.DataRow row)
        {
            this.IsExists = true;
            this.I_XT = Convert.ToInt32(row["I_XT"]);
            this.ID =Convert.ToInt32(row["ID"]);
            this.S_QISHIHM = Convert.ToString(row["S_QISHIHM"]);
            this.S_JIESHUHM = Convert.ToString(row["S_JIESHUHM"]);
            this.I_SHULIANG = Convert.ToInt32(row["I_SHULIANG"]);
            this.I_JLZT = Convert.ToInt32(row["I_JLZT"]);
            this.S_CAOZUOR = Convert.ToString(row["S_CAOZUOR"]);
            this.D_CAOZUOSJ = DbDateTime.Parse(row["D_CAOZUOSJ"]);
            this.S_MIAOSHU = Convert.ToString(row["S_MIAOSHU"]);
            return this;
        }
    }
    /// <summary>
    /// 发票库存明细
    /// </summary>
    public class DALYSZWFaPiaoKCMX : BaseDAL
    {
        public DALYSZWFaPiaoKCMX()
        {

        }
        protected override void fillSaveProc(BaseModel model)
        {
        }

        public List<YSZWFaPiaoKCMX> Get(int xt,int kcid)
        {
            dbProc.Init("P_YSZW_FAPIAOKCMXHQ");
            dbProc.AddParameter("V_XT", xt);
            dbProc.AddParameter("V_FAPIAOKCID", kcid);
            return CommonService.Ini().GetList<YSZWFaPiaoKCMX>(dbProc);
        }
    }

}